Generating Test Cases for Overloaded Object-Oriented Programs using EGS (Extended General State-charts)

نویسندگان

  • Bor-Yuan Tsai
  • Simon Stobart
  • Norman Parrington
چکیده

Overloading and polymorphism are two important aspects in object-oriented programming languages. When an class has either of these two specialities and is depicted with a state-chart which characterizes the behaviour of the class, problems arise. Such as different transition arcs are labelled with the same name but may represent similar duties on that state-chart. General state-charts (GS) can be used as patterns to model the overloading and polymorphism aspects of C++ programs. Furthermore, method functions can be mapped to a general state-chart to form an extended general state-chart (EGS). From these, state-transition trees can be generated. Errors, which occurs when overloaded/polymorphism functions are invoked against the wrong object, are hard to detect by state-based testing. This is because the resultant states after executing the messages could be the same as the expected states. In this class (unit) testing paper, we try to use EGS to produce legal and illegal test cases in order to test a class which has overloaded functions. The illegal test cases show all possible misusages of the overloaded functions.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Design Recovery for Software Testing ofObject - Oriented

Object-oriented features such as encapsulation, inheritance, and state dependent behavior raise new problems in software testing. In this paper, we describe a reverse engineering approach for software testing of object-oriented programs. The approach is based on a graphic model which consists of three types of diagrams: object relation diagram, block branch diagram, and object state diagram. An...

متن کامل

Symstra: A Framework for Generating Object-Oriented Unit Tests Using Symbolic Execution

Object-oriented unit tests consist of sequences of method invocations. Behavior of an invocation depends on the method’s arguments and the state of the receiver at the beginning of the invocation. Correspondingly, generating unit tests involves two tasks: generating method sequences that build relevant receiverobject states and generating relevant method arguments. This paper proposes Symstra, ...

متن کامل

An Evolutionary Approach for Performing Structural Unit-Testing on Third-Party Object-Oriented Java Software

Evolutionary Testing is an emerging methodology for automatically generating high quality test data. The focus of this paper is on presenting an approach for generating test cases for the unit-testing of object-oriented programs, with basis on the information provided by the structural analysis and interpretation of Java bytecode and on the dynamic execution of the instrumented test object. The...

متن کامل

State-Based Testing and Inheritance

State-based testing is a new technique developed for the testing of object-oriented programs. It compliments the more traditional approaches of functional and structural testing. The features of a class provide the desired behaviour by interacting with the data-representation. Although these interactions are found in programs written in more traditional languages, they are more visible and prev...

متن کامل

Class Level Test Case Generation in Object Oriented Software Testing

Object-oriented programming consists of several different levels of abstraction, namely, the algorithmic level, class level, cluster level, and system level. In this article, we discuss a testing technique to generate test cases at class level for object-oriented programs. The formal object oriented class specification is used to develop a test model. This test model is based on finite state ma...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007